package com.dragon.modules.yuegou.query.act;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.act.GiftBagMemberRefEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 礼包发放记录表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2020-08-06 16:53:18
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class GiftBagMemberRefQuery extends GiftBagMemberRefEntity implements Query<GiftBagMemberRefEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "giftBagId")
	private Condition<String> giftBagIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "giftBagName")
	private Condition<String> giftBagNameCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 手机号查询条件 */
	@JsonUnwrapped(prefix = "mobile")
	private Condition<String> mobileCondition;

    /** 发放数量查询条件 */
	@JsonUnwrapped(prefix = "num")
	private Condition<Integer> numCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 发放人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 是否撤回 0未撤回 1已撤回查询条件 */
	@JsonUnwrapped(prefix = "withdraw")
	private Condition<Boolean> withdrawCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public GiftBagMemberRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public GiftBagMemberRefQuery(GiftBagMemberRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public GiftBagMemberRefQuery(GiftBagMemberRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.giftBagIdCondition != null) {
			this.giftBagIdCondition = other.giftBagIdCondition.copy();
		}
		if(other.giftBagNameCondition != null) {
			this.giftBagNameCondition = other.giftBagNameCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.mobileCondition != null) {
			this.mobileCondition = other.mobileCondition.copy();
		}
		if(other.numCondition != null) {
			this.numCondition = other.numCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.withdrawCondition != null) {
			this.withdrawCondition = other.withdrawCondition.copy();
		}
	}

	@Override
	public QueryWrapper<GiftBagMemberRefEntity> toQueryWrapper() {
		QueryWrapper<GiftBagMemberRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (giftBagIdCondition != null) {
			giftBagIdCondition.toWrapper(wrapper, COL_GIFT_BAG_ID);
		}
		if (giftBagNameCondition != null) {
			giftBagNameCondition.toWrapper(wrapper, COL_GIFT_BAG_NAME);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (mobileCondition != null) {
			mobileCondition.toWrapper(wrapper, COL_MOBILE);
		}
		if (numCondition != null) {
			numCondition.toWrapper(wrapper, COL_NUM);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (withdrawCondition != null) {
			withdrawCondition.toWrapper(wrapper, COL_WITHDRAW);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return giftBagIdCondition 查询条件
	 */
	public Condition<String> giftBagId() {
		this.giftBagIdCondition = new Condition<>();
		return this.giftBagIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return giftBagIdCondition 查询条件
	 */
	public Condition<String> getGiftBagIdCondition() {
		return giftBagIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param giftBagIdCondition 查询条件
	 */
	public void setGiftBagIdCondition(Condition<String> giftBagIdCondition) {
		this.giftBagIdCondition = giftBagIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return giftBagNameCondition 查询条件
	 */
	public Condition<String> giftBagName() {
		this.giftBagNameCondition = new Condition<>();
		return this.giftBagNameCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return giftBagNameCondition 查询条件
	 */
	public Condition<String> getGiftBagNameCondition() {
		return giftBagNameCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param giftBagNameCondition 查询条件
	 */
	public void setGiftBagNameCondition(Condition<String> giftBagNameCondition) {
		this.giftBagNameCondition = giftBagNameCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return memberIdCondition 查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return memberIdCondition 查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param memberIdCondition 查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return busdIdCondition 查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return busdIdCondition 查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param busdIdCondition 查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回手机号查询条件
	 * 
	 * @return mobileCondition 手机号查询条件
	 */
	public Condition<String> mobile() {
		this.mobileCondition = new Condition<>();
		return this.mobileCondition;
	}
	
	/**
	 * 获取手机号查询条件
	 * 
	 * @return mobileCondition 手机号查询条件
	 */
	public Condition<String> getMobileCondition() {
		return mobileCondition;
	}

	/**
	 * 设置手机号查询条件
	 * 
	 * @param mobileCondition 手机号查询条件
	 */
	public void setMobileCondition(Condition<String> mobileCondition) {
		this.mobileCondition = mobileCondition;
	}

	/**
	 * 构造并返回发放数量查询条件
	 * 
	 * @return numCondition 发放数量查询条件
	 */
	public Condition<Integer> num() {
		this.numCondition = new Condition<>();
		return this.numCondition;
	}
	
	/**
	 * 获取发放数量查询条件
	 * 
	 * @return numCondition 发放数量查询条件
	 */
	public Condition<Integer> getNumCondition() {
		return numCondition;
	}

	/**
	 * 设置发放数量查询条件
	 * 
	 * @param numCondition 发放数量查询条件
	 */
	public void setNumCondition(Condition<Integer> numCondition) {
		this.numCondition = numCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回发放人查询条件
	 * 
	 * @return createdByCondition 发放人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取发放人查询条件
	 * 
	 * @return createdByCondition 发放人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置发放人查询条件
	 * 
	 * @param createdByCondition 发放人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回是否撤回 0未撤回 1已撤回查询条件
	 * 
	 * @return withdrawCondition 是否撤回 0未撤回 1已撤回查询条件
	 */
	public Condition<Boolean> withdraw() {
		this.withdrawCondition = new Condition<>();
		return this.withdrawCondition;
	}
	
	/**
	 * 获取是否撤回 0未撤回 1已撤回查询条件
	 * 
	 * @return withdrawCondition 是否撤回 0未撤回 1已撤回查询条件
	 */
	public Condition<Boolean> getWithdrawCondition() {
		return withdrawCondition;
	}

	/**
	 * 设置是否撤回 0未撤回 1已撤回查询条件
	 * 
	 * @param withdrawCondition 是否撤回 0未撤回 1已撤回查询条件
	 */
	public void setWithdrawCondition(Condition<Boolean> withdrawCondition) {
		this.withdrawCondition = withdrawCondition;
	}

}
